1. Field of the Invention
The present invention relates to the field of image color adjustment and, more particularly, to an automatic white-balance correction method for digital camera, digital video camera, or PC camera.
2. Description of Related Art
Currently, the automatic white-balance correction method is in wide spread use in the digital camera, digital video camera or a PC camera. However, the variation of natural light due to different time or weather condition and the effect of artificial illumination may cause errors in color tones as taking pictures by a camera or video camera. For example, the picture will show yellow color when the color temperature of light source is low, and blue color when the color temperature of light source is high. Therefore, the high color temperature (8500K) of light source from the fluorescent lamps commonly used in our everyday life will make the color of picture to be of blue color. Moreover, the specific wavelength of the fluorescent lamps may also make the color of picture to be of green color. As such, there is a need to perform an adjustment such that the color of the captured object is not affected by the circumstance. Such an adjustment is performed by white-balance correction, which allows the captured picture to be white-balanced in color. That is, the color of a white object is always shown to be white under any light sources.
The white-balance correction of the conventional analog camera is performed by integrating the red and blue chromatic signals (R-Y and B-Y) respectively, so as to control the gains of the red and blue signal, thereby the integral value being approached to the white-balance point. Therefore, the aforementioned white-balance correction is easily disturbed by the color of the object to be captured, and the color of the captured image will deviate from the origin color of the picture. In the advanced digital camera, the red and blue signals of objects taken by the photo-sensors are used to control the gains of red and blue signals for performing the white-balance correction. However, due to the limitation of visual angle of sensitivity of the photo-sensors, the performance of such a white-balance correction is not satisfactory.
Another white-balance correction method for digital camera is performed by analyzing the image to determine the luminance (Y), blue chrominance (Cb) and red chrominance (Cr) for the pixels of each region in the picture, so as to alleviate the color deviation in different color temperatures. However, such a white-balance correction method only considers the general variation of color temperature rather than artificial illumination, for example, the fluorescent lamps, and thus it can not work well for white-balance correction under fluorescent lamps. Furthermore, such a conventional method judges the color temperature according to the variation degree of the neighboring regions and the concentration of color. It results in less color loss for the object having a huge color block and a high color concentration. However, the probability of having a huge color block in a general environment is quit low and the CCD camera usually has different sensing features in the center and the peripheral portions. The huge color blocks with the same color exist very seldom in general environment. The judgement of color concentration may result in having no correction for the color block with a high color concentration, which may be caused by color temperature. Therefore, this adjustment can be applied to a specific condition, but is not suitable in general environment to achieve the white-balance correction. Therefore, there is a need to have a novel white-balance correction method to mitigate and/or obviate the aforementioned problems.
The object of the present invention is to provide an automatic white-balance correction method for digital camera, which utilizes the variation curve of color temperature as a reference for performing an adjustment, so as to avoid abnormal correction result, and avoid being influenced by small color block.
With this object in view, the automatic white-balance correction method for digital camera in accordance with the present invention divides a captured picture into multiple sampled regions for performing a white-balance correction. The method includes the steps of: (A) transforming image data of the captured picture form RGB format to YCrCb format; (B) calculating mean values of Y, Cr, and Cb for each sampled region based on the multiple sampled regions; and (C) using Cr and Cb as two coordinate axes to define four quadrants, and using the values of Cr and Cb of each sampled region to determine a corresponding quadrant for each sampled region, thereby determining a correction direction based on the number of sampled regions in each quadrant.
Other objects, advantages, and novel features of the invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.